package com.ljs.feign;

import com.ljs.entity.Menu;
import com.ljs.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "menuprovider",fallback = Menuerror.class)
public interface MenuFeign {
    @GetMapping("/menu/findall/{index}/{limit}")
    public List<Menu> selAll(@PathVariable("index") int index, @PathVariable("limit") int limit);

@GetMapping("/menu/name/{na}")

    public   List<Menu> selbyname(@PathVariable("na") String name);
@GetMapping("/menu/index")
    public String selport();
@GetMapping("/menu/all")
public   List<Menu> all();
    @GetMapping("/menu/count")

    public int count();
    @GetMapping("/menu/delete/{id}")
    public  boolean delete(@PathVariable("id") int id);
    @GetMapping("/menu/save")
    public  boolean save(@RequestBody Menu menu);
    @GetMapping("/menu/upd/{id}")
    public  Menu selbyid(@PathVariable("id") int id);
    @GetMapping("/menu/update")
    public  boolean update(@RequestBody Menu menu);
}
